package com.push.web.service.impl;

import java.util.List;
import com.push.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.push.web.mapper.BizRssMapper;
import com.push.web.domain.BizRss;
import com.push.web.service.IBizRssService;

/**
 * RSS订阅Service业务层处理
 *
 * @author yanxi
 * @date 2022-11-22
 */
@Service
public class BizRssServiceImpl implements IBizRssService
{
    @Autowired
    private BizRssMapper bizRssMapper;

    /**
     * 查询RSS订阅
     *
     * @param id RSS订阅主键
     * @return RSS订阅
     */
    @Override
    public BizRss selectBizRssById(Long id)
    {
        System.out.println("id:"+id);
        return bizRssMapper.selectBizRssById(id);
    }

    /**
     * 查询RSS订阅列表
     *
     * @param bizRss RSS订阅
     * @return RSS订阅
     */
    @Override
    public List<BizRss> selectBizRssList(BizRss bizRss)
    {
        return bizRssMapper.selectBizRssList(bizRss);
    }

    /**
     * 新增RSS订阅
     *
     * @param bizRss RSS订阅
     * @return 结果
     */
    @Override
    public int insertBizRss(BizRss bizRss)
    {
        return bizRssMapper.insertBizRss(bizRss);
    }

    /**
     * 修改RSS订阅
     *
     * @param bizRss RSS订阅
     * @return 结果
     */
    @Override
    public int updateBizRss(BizRss bizRss)
    {
        bizRss.setUpdateTime(DateUtils.getNowDate());
        return bizRssMapper.updateBizRss(bizRss);
    }

    /**
     * 批量删除RSS订阅
     *
     * @param ids 需要删除的RSS订阅主键
     * @return 结果
     */
    @Override
    public int deleteBizRssByIds(Long[] ids)
    {
        return bizRssMapper.deleteBizRssByIds(ids);
    }

    /**
     * 删除RSS订阅信息
     *
     * @param id RSS订阅主键
     * @return 结果
     */
    @Override
    public int deleteBizRssById(Long id)
    {
        return bizRssMapper.deleteBizRssById(id);
    }
}
